package com.example.service;

import com.example.exception.createException.DeletionNotAllowedException;
import com.github.pagehelper.Page;
import com.pojo.dto.CategoryDTO;
import com.pojo.dto.QueryPageDTO;
import com.pojo.entity.Category;
import org.springframework.stereotype.Service;

import java.util.List;


public interface CategoryService {
    Page<Category> page(QueryPageDTO queryPageDTO);

    void save(CategoryDTO categoryDTO);

    void deleteById(Long id) throws DeletionNotAllowedException;

    void update(CategoryDTO categoryDTO);

    Category getById(Long id);

    List<Category> allList();
}
